package com.ganbo.stock.repository;

import com.ganbo.stock.entity.FundStockLastHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@Repository
public interface FundStockLastHistoryRepository extends JpaRepository<FundStockLastHistory, Long> {

    void deleteFundStockLastByStatistics(Date statistics);

    List<FundStockLastHistory> findFundStockLastByStatistics(Date statistics);

    //查询当天跌幅大于某个点的股票(低吸)
    List<FundStockLastHistory> findFundStockLastByPcLessThanEqualAndStatistics(BigDecimal pc, Date statistics);

    //查询当天涨幅大于某个点的股票(高抛)
    List<FundStockLastHistory> findFundStockLastByPcGreaterThanEqualAndStatistics(BigDecimal pc, Date statistics);

}
